doctype html
html
  head
    title= title
    link(rel="stylesheet", href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/css/bootstrap.min.css" integrity="sha384-B0vP5xmATw1+K9KRQjQERJvTumQW0nPEzvF6L/Z6nronJ3oUOFUFpCjEUQouq2+l" crossorigin="anonymous")
    script(src="/socket.io/socket.io.js")
    script= 'const socket = io();'

  body
    div(class="container")
      table(class="table table-bordered")
        thead(calss="thead-light")
          tr 
            th(width='300px')='产品原型'
            th='更新内容'
            th(width='180px')='更新时间'
            th(width='180px')
          
        tbody 
          each project, index in projects.filter(item=> {return item.projectType==1;})
            tr
              td=project.projectName
              td!=`${project.currentVersion?project.currentVersion.changeList:'未上传原型'}`
              td=`${project.currentVersion?project.currentVersion.uploadDateTime:'--'}`
              td
                a(href=`/storage/${project.currentVersion?project.currentVersion.webPath+'/':'#'}`)='查看原型'
                span=' '
                a(href=`/project/${project.projectId}/`)='历史版本' 


          else 
            tr
              td(colspan='3')='暂无原型'

      table(class="table table-bordered")
        thead(calss="thead-light")
          tr 
            th(width='300px')='产品原型'
            th='更新内容'
            th(width='180px')='更新时间'
            th(width='180px')
        tbody
          each project, index in projects.filter(item=> {return item.projectType==2;})
            tr
              td=project.projectName
              td!=`${project.currentVersion?project.currentVersion.changeList:'未上传原型'}`
              td=`${project.currentVersion?project.currentVersion.uploadDateTime:'--'}`
              td
                a(href=`/storage/${project.currentVersion?project.currentVersion.webPath+'/':'#'}`)='查看原型'
                span=' '
                a(href=`/project/${project.projectId}/`)='历史版本'
          else 
            tr
              td(colspan='3',style='text-align:center')='暂无原型'
            